Labels

_fuxi (75) _IV (146) _misc (5) {610610 (30) algo (1) automatedTrading (8) banking/economy (3) book (14) c++misc (125) c++real (15) c++STL/java_container (7) cppTemplate (1) db (13) DB_tuning (4) deepUnder (1) dotnet (69) eTip (17) excelVBA (12) finance+sys (34) financeMisc (24) financeRisk (2) financeTechMisc (4) financeVol (21) finmath (17) fixedIncome (25) forex (16) IDE (24) invest (1) java (43) latency (4) LinearAlgebra (3) math (30) matlab (24) memoryMgmt (11) metaPrograming (2) MOM (15) msfm (1) murex (4) nofx (11) nosql (3) OO_Design (1) original_content (4) scriptUnixAutosys (19) SOA (7) socket/stream (15) sticky (1) subquery+join (2) swing (32) sybase (6) tech_orphan (12) tech+fin_career (30) telco (11) thread (21) timeSaver (13) tune (10) US_imm (2) US_misc (2) windoz (20) z_algo+dataStructure (4) z_arch (2) z_c#GUI (30) z_career (10) z_career]US^Asia (2) z_careerBig20 (1) z_careerFinanceTech (11) z_FIX (6) z_forex (31) z_hib (2) z_ikm (7) z_inMemDB (3) z_j2ee (10) z_oq (14) z_php (1) z_py (26) z_quant (4) z_skillist (3) z_spr (5)
Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Sunday, June 14, 2015

validate]biz obj ^ validation@user input

Q: give 1 or 2 simple but important reasons to favor either option?

I think sometimes you need extra "information" that's unavailable at UI layer. Example? zed credit check; credit card address check

Generally, we validate asap.

--

weblogic server910_generic.jar

Q: where to find this jar?
A: according to google: go to bea download site, select "solaris 10 x86" and u will get server910_generic.jar
Q: Working on solaris on sparc hardware?
A: yes. Tested many times with T2000 servers.
Q: The jar can work on win32?
A: jdk150_08 will break weblogic910. Confirmed: jdk150_04 supports weblogic insalled from weblogic910_generic.jar


--
Posted By familyman to learning finance,c++,py... <http://bigblog.tanbin.com/2006/09/weblogic-server910genericjar.html> at 9/23/2006 12:53:00 AM

JMV tuning top 2 topics GC ^ JIT

label - book

[[Java Performance: The Definitive Guide]] clearly hints that these are top 2 topics for the jvm performance experts.

Saturday, April 18, 2015

[[java performance]] by Scott Oaks

--[[java performance]] by Scott Oaks

 

best of breed..see chapter details on

[jvm] heap memory

[jvm] threading

[jvm] instrumentation

JPA

serialization

lambda, stream  (java 8 interviews!)

 

The Introduction chapter outlines 3 broad aspects

* JVM – like memory tuning

* java language – like threading, collections

* Java API -- like xml parser, JDBC, serialization, Json...

 

JVM tuning is done by "system engineers" who may not be developers.

 

Saturday, November 15, 2014

CompletionService + others (Credit Suisse IV

Other threading questions.

safe publication
fail fast vs fail safe
timers (scheduled task queue, scheduled thread pool)
3 ways to create threads
how to shut down a multithreaded app
handle all exceptions in a thread pool?

Saturday, May 17, 2014

ways to reduce java OOM@@ (open questions

Q: Increase OS swap file size?

Q: add RAM?

Saturday, January 18, 2014

[[practical api design]] java

I find this book rather detailed, not a lot of high-level (vague) concepts like most  design/architecture books including the classics. It seems to deal with some real world coding and design decisions. I would say these are not life-and-death decisions but still everyday decisions. (In contrast those other books address decisions I don't encounter or care at all -- seem to belong to another level.) Therefore this book is closer to my life as a developer.

chapter against "extreme" (unhealthy) advice. unconventional critique
** an api must be beautiful
** an api must be correct
** an api must be simple
** an api must have good performance
** an api must be 100% compatible
** an api must be symmetrical

chapter on creating a threadsafe API, to be used by clueless and untrained programmers.

chapter on supervising the development of an API

chapter on the fear of committing to a stable API

chapter on Factory better than constructor

chapter on making everything final

Saturday, June 23, 2012

millions of scala actors in on JVM

Someone A said you can have millions of scala threads in one JVM. Then someone else B told me scala uses actors not threads. B then told me yes you can have millions of actors in a jvm.
 

Thursday, June 21, 2012

netbeans - remote, per-method monitoring

netbeans can monitor per-method statistics

netbeans can attach to remove VM

Wednesday, June 20, 2012

class unloading during GC

JVM class UNloading happens only during full GC, when permgen is too full for loading new classes.

When you get a full permgen, it's good to know why so many classes.

Saturday, May 19, 2012

inline vs System.gc()

Someone pointed out in both cases we programmers are suggesting to the compiler/runtime, who might ignore our suggestion.

See P363 [[c++primer]]

Tuesday, April 10, 2012

java enum to implement singleton

Can implement/replace eager singleton.

Highly recommended by Joshua Bloch. See http://stackoverflow.com/questions/1750435/comparing-java-enum-members-or-equals

Friday, January 13, 2012

idle timer inside app server engines

I just realized idle timers are often "passive". You may imagine a separate thread performing periodic polling to detect idlers[1]. Well, not common.

Idle Timer is just a "state" added to the "decoratee". When the decoratee becomes idle, that time is saved in that state field. When a "Request" is received from a client Call from any thread, the state is checked. If idle time has been too long, we kill that decoratee or mark it as obsolete

See P189 [[Weblogic]]

[1] Heart beat checker is that way.

Sunday, August 28, 2011

private without non-static

I feel it's sometimes useful to program java with everything static, but use private/protected to control access.

Object state is implemented using struct. Operations on objects are implemented in static functions. C++ back to C.

I feel function pointers add lots of power.

Monday, August 22, 2011

singletons - why is the nested class implementation important

http://en.wikipedia.org/wiki/Initialization_on_demand_holder_idiom is
the recommended solution. My friend Rohan pointed out why this
solution is sometimes necessary.

Say you can't eager init the static field because it must wait for
some service object.

Say you also don't want to incur the static synchronization every
time. Though un-contended lock acquisition is cheap, it's never free.

Friday, July 8, 2011

not all BEA products are market share leaders

1) weblogic server

2) Oracle service bus. This is not the MOM

other BEA products aren't as widely used.

Saturday, May 14, 2011

MyMain from XR, showing non-blocking behavior of blocking queue

You can get blocking behavior if you avoid ThreadPoolExecutor.execute(). You can create an Array blocking queue (myABQ) and submit tasks using myABQ.put().

I learnt this from my Taiwan colleague.

On Fri, Apr 8, 2011 at 11:56 PM, Bin TAN (Victor)  wrote:
ThreadPoolExector api made it clear -- New tasks submitted in method ThreadPoolExecutor.execute will be rejected when the Executor has been shut down, and also when the Executor uses finite bounds for both maximum threads and work queue capacity, and is saturated.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6648211 describes the non-blocking behavior of blocking thread pool, and mentions a Spring forum discussion --

You have to modify the java.util.concurrent.ThreadPoolExecutor by overriding the execute method and place a task with a put instead of an offer with a zero timeout on the workqueue.

Or you could use the BlockingExecutor (and the ThreadPoolBlockingExecutor as standard implementation) from Prometheus. The primary reason of existence of these classes was to create an Executor that is able to block.

Friday, May 6, 2011

jmx - my best practices

JMX is infrastructure and need reliability.

* Remove dependencies. Remove layers of indirect dependencies.
* Prefer primitives. Minimize chance of NPE or other exceptions.
* Avoid deep nested method calls.
* Fully Static flow is fine. Just a little bit less danger of NPE.

Friday, April 29, 2011

overwrite a single file in a jar

It's easy to ADD your new file rather than overwriting. But always
verify by
1) jar tf
2) jar xf


"jar uf my.jar rel/path/to/file" will probably show "rel/path/to/file"
in jar-tf output