Topics | Search Log Out | Register | Edit Profile
Hide Clipart | Banned/Unbanned User Log | Moderator Login History | Thread Delete/Move Log | Last 30 mins | 1 | 2
Java Question

Chalanachithram.com DB » New TF Industry Related » Archive through August 28, 2017 » Java Question « Previous Next »
Author Message
 

Ringo_rangaswamy
Hero
Username: Ringo_rangaswamy

Post Number: 17412
Registered: 02-2011
Posted From: 67.82.48.47

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, August 26, 2017 - 03:23 pm:       


Teluguswift:





Since you are publishing your jar to multiple clients, you and clients must agree on a common interface first.

You should have a base version implementation or let your clients plug in their implementation of the interface.

That should resolve the issue for you.


If your clients don't come to an agreement on the interface, then you cannot accomplish anything.
 

Teluguswift
Junior Artist
Username: Teluguswift

Post Number: 127
Registered: 07-2014
Posted From: 71.204.168.235

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, August 26, 2017 - 12:15 pm:       


Myselfme:



We have a function like getitems(),however this function execution is dependent on client implementation classes.A service would have been idle here.But in this case,we have to trim to base version where we donot have dependency on client implementation.
We are trying to see if this is ok.
 

Myselfme
Junior Artist
Username: Myselfme

Post Number: 355
Registered: 04-2011
Posted From: 73.22.114.102

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, August 26, 2017 - 09:04 am:       

tried to understand little more:

So you have server side code (your service) has few functions, Example. getItems(), getOrders()

client code should call these methods (over the network), but you don't want to generate code like SOAP or REST? is that right?

In addition it also support server push?
 

Thokkalohdi
Hero
Username: Thokkalohdi

Post Number: 13402
Registered: 01-2008
Posted From: 24.5.236.139

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, August 26, 2017 - 08:53 am:       

Antey oka client ki raasina code inko client kosam official ga copy kodthunnara ?
 

Myselfme
Junior Artist
Username: Myselfme

Post Number: 354
Registered: 04-2011
Posted From: 73.22.114.102

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, August 26, 2017 - 08:33 am:       

Still didn't understand your requirement.

Are you looking for "server push" feature to client?
 

Ringo_rangaswamy
Hero
Username: Ringo_rangaswamy

Post Number: 17409
Registered: 02-2011
Posted From: 67.82.48.47

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, August 26, 2017 - 06:37 am:       


Teluguswift:




Will passing callbacks work?
 

Last_avataar
Side Hero
Username: Last_avataar

Post Number: 9425
Registered: 09-2012
Posted From: 12.10.219.221

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, August 26, 2017 - 01:05 am:       


Teluguswift:

No we want this jar to be used by several clients and do not want to have client code




if that is the case why the jar is making a callback to client code
isn't a flawed design ? It is only client who should call and not vice versa

if such dependency is must similar functionality can be replicated in jar to avoid call back
 

Jambalahaart_raja
Side Hero
Username: Jambalahaart_raja

Post Number: 8228
Registered: 07-2008
Posted From: 24.46.111.147

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, August 26, 2017 - 12:24 am:       


Teluguswift:

do we need to have a design pattern similar to servlets and how correct it is to use now anedi.



Your first post, and all your subsequent posts are not clear whether this is a over-the-network system. The service you are developing, the clients using them, other teams extending your service for their domains, everything can be commonly shared jar between multiple micro-services also, developed by each team while you are expected to develop the base architecture framework classes.
yedi yemaina, MVC is the core of any enterprise scale design. The Servlet model was just an example. Think about your system in the lines of MVC implementation, and everything will be clear. Unless, highly asynchronous Observables and Observers based Reactive-Java or Dependency Injection framework is what you are working and referring to.
"Chill Bro.
I told you to let it go!!"
- The Budhha.
 

Dma
Hero
Username: Dma

Post Number: 18967
Registered: 11-2009
Posted From: 172.58.21.181

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, August 26, 2017 - 12:20 am:       

alternatively, have an interface and code your jar to use interface and on client side, they can use factory pattern and pass in the class name as parameter.
Jai Andhra!! Jai Jai Andhra!!!
 

Teluguswift
Junior Artist
Username: Teluguswift

Post Number: 126
Registered: 07-2014
Posted From: 71.204.168.235

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, August 26, 2017 - 12:06 am:       


Teluguswift:



Jambalahaart_raja:



Thanks for the response sir.Appreciate your thoughts on this.
My only point is ,ee jamana lo do we need to have a design pattern similar to servlets and how correct it is to use now anedi.
 

Teluguswift
Junior Artist
Username: Teluguswift

Post Number: 125
Registered: 07-2014
Posted From: 71.204.168.235

Rating: N/A
Votes: 0 (Vote!)

Posted on Saturday, August 26, 2017 - 12:04 am:       


Myselfme:



To be frank,micro service is our proposed option but mgmt does not want it for various reasons, which i cannot disclose here say for different reasons ( not technical)

Coming to what the jar does,it performs some thing like workflow actions.The hanlder classes will be client specific and the execute method of the jar needs these handler classes during its implementation.
 

Myselfme
Junior Artist
Username: Myselfme

Post Number: 353
Registered: 04-2011
Posted From: 73.22.114.102

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, August 25, 2017 - 11:46 pm:       

What does the services do, serve data to the client?
 

Jeffa
Comedian
Username: Jeffa

Post Number: 1104
Registered: 10-2012
Posted From: 73.222.215.160

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, August 25, 2017 - 11:44 pm:       

The only mantra to chant here is microservice (aka rest interfaces to communicate across dependencies)
One danger of using your jar in another domain module is.. when ever you have change in your code, which directly influence their domain functionalities, and they have to regress and redeploy(entire Dev Ops process) their module, this is a VERY BAD practice where microservices comes to rescue this kinda situation.
 

Jambalahaart_raja
Side Hero
Username: Jambalahaart_raja

Post Number: 8227
Registered: 07-2008
Posted From: 24.46.111.147

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, August 25, 2017 - 10:58 pm:       

Servlet class has Service method with signature -
service ( ServletRequest request, ServletResponse response);
A similar implementation signature could also be
ServletResponse service ( ServletRequest request);
If you get my drift in this.
ServletRequest, ServletResponse and Servlet are all interfaces.
The actual object instance at run-time is supplied by the Servlet-Container. We write the code for the Servlet implementation, but the object instance at run-time is still managed by the Container only.
Your Jar as a Service should have interfaces, implementation classes for both requests and responses, the service implementations, all necessary details. Clients will communicate with your jar by using your jar's classes and designs.

Another way to deal with similar issues is using xml or json. They are not just meant for web based data transfers, but instead, write an object state into a JSON format in-memory string, pass it into a service object in your jar, and your service object will respond with a JSON format in-memory string response. this way, request and response, input and output objects and interfaces need not even be declared inside your jar. There are lot many maintenance issues in this, extending support for more JSON tags etc etc.
"Chill Bro.
I told you to let it go!!"
- The Budhha.
 

Teluguswift
Junior Artist
Username: Teluguswift

Post Number: 124
Registered: 07-2014
Posted From: 107.77.75.27

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, August 25, 2017 - 03:35 pm:       


Last_avataar:



No we want this jar to be used by several clients and do not want to have client code
 

Last_avataar
Side Hero
Username: Last_avataar

Post Number: 9424
Registered: 09-2012
Posted From: 12.10.219.223

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, August 25, 2017 - 03:26 pm:       


Teluguswift:




Is the client class and jar are tightly coupled in your code ?

1. for their purpose only can't you shift the client classed to jar to make it independent, and no call backs ?
 

Teluguswift
Junior Artist
Username: Teluguswift

Post Number: 123
Registered: 07-2014
Posted From: 173.224.162.69

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, August 25, 2017 - 03:14 pm:       


Jambalahaart_raja:



I got that point.The issue here is when the client create objects out of the interfaces of the jar,
but how the jar is aware of the client specifics .My question is how a jar can communicate back to the client if needed during the execution of a function.
 

Jambalahaart_raja
Side Hero
Username: Jambalahaart_raja

Post Number: 8226
Registered: 07-2008
Posted From: 24.46.111.147

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, August 25, 2017 - 02:27 pm:       

The solution is to design it in reverse.
The Client will use classes that are declared inside the jar, create objects out of it, and submit the objects with the apt state to the jar for further processing.
The entire notion of Service is to encapsulate everything, request objects, input objects, service objects, executor objects, multi-threading objects, concurrency objects, locks and everything, and output objects and response objects even, possibly even protocol objects like SOAP or REST with HATEOAS.
"Chill Bro.
I told you to let it go!!"
- The Budhha.
 

Teluguswift
Junior Artist
Username: Teluguswift

Post Number: 122
Registered: 07-2014
Posted From: 173.224.162.69

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, August 25, 2017 - 02:14 pm:       

Hi all,
Need your expert advice on one of the problems .Our team is developing set of services for a use case.Some of the internal teams want to use our services code for implementing the use case on their domain and they want a jar out of our service.
Coming to the problem ,the functions in the jar needs client classes to execute the function.
For example,if we invokce execute() in jar,the navigation of the flow at some point need classes on client side.How to resolve this.
Are there any design patterns to solve this.

What is your advice is the best approach in this scenario.

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image HASH(0x979c4b8){Movie Clipart}
Show / hide regular icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Show / Hide Filmy icons selection options

Click on following links to open cliparts by Alphabetical Order

  A   B   C   D   E   F   G   H   I   J   K   L   M  

N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: