Originally posted by DimPrawn
View Post
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Real-time multi-user Flex/Java app... sockets
Collapse
X
-
-
Originally posted by NickFitz View PostYes, I've heard that networking stuff is really easy with MS technologiesComment
-
Originally posted by DimPrawn View PostThis is a piece of cake in Silverlight and WCF.Originally posted by MaryPoppinsI'd still not breastfeed a naziOriginally posted by vetranUrine is quite nourishingComment
-
Originally posted by minestrone View PostI would be very hesitant to create a thread that controls sockets in that way, you should really create 2 applications.Originally posted by MaryPoppinsI'd still not breastfeed a naziOriginally posted by vetranUrine is quite nourishingComment
-
Originally posted by d000hg View PostHmm, let me simplify a little. I'm aware that Flash can use sockets directly but let's forget the client part totally.
Now the question is simply, how do you have a Java web-server (probably Spring) which can maintain open socket connections to multiple clients as well as doing more traditional HTTPRequest/response handling through servlet/JSP type architecture?
I guess my confusion is partly over the fact a servlet-based app, especially using SpringMVC, has no entry-point in the traditional sense... no main() in which you can set up non-webserver functionality.
I could have two distinct apps, a webserver and a socket app... but that's not ideal. When sockets are not available, it's likely a web-service or AJAX might be used as a fall-back so conceptually the same app should provide servlet, web-service and socket based communications for different clients.
In the init() method of the servlet, it starts a ServerSocket thread which 'listens' for client connections. When a new client connection arrives it creates another thread to handle this client connection.
You still have flexibility to handle doXXX() methods for normal HttpRequest processing (probably using the ServerSocket object).
When the servlet container is shut down, the destroy() method cleans up the ServerSocket and Client connection threads.
Essentilly non-webserver functionality is handled by init() and normal request procesing by doXXX() all managed by a single servlet.
Whether this idiom can be used for production level applications is a moot point.Comment
-
Originally posted by d000hg View PostFlex makes the socket thing very easy on the client side; how do sockets fit into the WCF framework? And how do you integrate WCF & ASP.net into a single app? I don't plan to go the MS route, but it's always interesting to learn for the future.
Comment
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Streamline Your Retirement with iSIPP: A Solution for Contractor Pensions Sep 1 09:13
- Making the most of pension lump sums: overview for contractors Sep 1 08:36
- Umbrella company tribunal cases are opening up; are your wages subject to unlawful deductions, too? Aug 31 08:38
- Contractors, relabelling 'labour' as 'services' to appear 'fully contracted out' won't dupe IR35 inspectors Aug 31 08:30
- How often does HMRC check tax returns? Aug 30 08:27
- Work-life balance as an IT contractor: 5 top tips from a tech recruiter Aug 30 08:20
- Autumn Statement 2023 tipped to prioritise mental health, in a boost for UK workplaces Aug 29 08:33
- Final reminder for contractors to respond to the umbrella consultation (closing today) Aug 29 08:09
- Top 5 most in demand cyber security contract roles Aug 25 08:38
- Changes to the right to request flexible working are incoming, but how will contractors be affected? Aug 24 08:25
Comment