|
Thanks
|
|
|
|
|
D4rkTrick wrote: I got the feeling, that new programming languages spread out of the earth like gras
Rather certain that that is a fact. Use the following to watch the ones that actually make it above the noise come and then go.
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html[^]
And an example of extremism
https://en.wikipedia.org/wiki/Whitespace_%28programming_language%29[^]
D4rkTrick wrote: So if you want the have a keyword X, you can just implement it as an add-on to the compiler.
To a large extent there have already been languages like that. "Forth" is just that. There was some other language sponsored by the US government (i believe) years ago that did something simpler.
There is however a great deal of difference between whether something is possible and whether you should do it.
D4rkTrick wrote: you might get in a situation like this:
Not me. I have learned that all of that is subjective.
D4rkTrick wrote: which forces me to do a lot of writing for things, that could be automated
Learn how to do code generation. You write a program that takes in input source and outputs code.
HOWEVER, that said, do not think that even most code can be created that way. At some point the very reason programmers are needed is due to the variable nature of what is needed. And writing a code generator that can handle that is not only impossible but even attempting to do so produces code in the generator that is a mess.
D4rkTrick wrote: So then, the compiler would not be a blackbox anymore
You might enjoy taking some college level courses specifically addressing compiler design.
|
|
|
|
|
So funny that a couple of years later (now) people are using babel, webpack, typescript, which is essentially exactly what I was thinking at that time
|
|
|
|
|
I'm relatively new to web applications development, specially when it comes to frontend, but as I understood, a typical frontend would have a php/jsp layer that calls the backend to generate dynamic pages.
Now we're designing a new site, and a colleague of mine insists on not having that layer. He wants the pages to have html and JS, that will then directly invoke the backend. This, of course, means having the backend services publicly available, which I'm not particularly comfortable with.
Is this architecture somehow common? Can it be considered to follow MVC?
|
|
|
|
|
I never even touched PHP nor Java, the 'typical' website at our company is written in MVC. Still, any public service that is available from the internet will be used by someone you don't know. May be a good way to test its robustness, but I wouldn't recommend having a public webservice without any authentication that can be used to delete data
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I am creating a Java web service that is receiving input requests in XML format. The web service's function is to parse the XML initial request and send it's own post request to a third party organization which does a look-up for the request and if available they send a response back in XML format to the web service for processing. If the response does find the data in the look-up the information it sends back as XML and is parsed by the web service then saved as a .pdf file. Once the .pdf file is created the web service packages a response XML message and along with the identifying information a link to the .pdf is part of the message sent back to the calling client. Now, if the search for the information is not found a XML message is sent back to the client indication the third party did not have the information ready with a status as pending. For all of the requests for the third party information the web service will create a folder on the server with a XML status file and if the .pdf file is created it will be in this folder too.
Now comes the tricky part of the design. There is another application located on the same server that needs to be running in a loop that and every 30 second it needs to call the web service on it's own and if the server folder created by each new request does not contain the .pdf that program will make the web service call to retry the initial call and see if third party does now responds with the XML message that contains the valid information so it can create the .pdf and send a message back to the original client.
Now, if I am using a tomcat server what type of application should I create that does the 30 second looping? The server does have a MySQL database. How should I have the 30 second looping application communicate with the web service? Finally, if the looping application does make a successful call to the web service what is the best way to cause a trigger from the looping application to make the web service send the successful response to the original calling client?
Finally, if the looping application does make a successful call to the web service what is the best way to cause a trigger from the looping application to make the web service send the successful response to the original calling client? One note is that the 30 second loop must scan the new request folder tree and retry for any of the requests that have not succeeded.
|
|
|
|
|
I have given this problem a lot of thought and I think I might have a solution. The site does have an IIS server as part of the application. I think I could create another asp .net web service that runs on that site and have it handle the 30 timing process. What I think might work is that I use a 30 second sleep then cycle through the process again. Does anyone see any problems with doing this? Any problems with resources or having a separate web service running like a different thread in the same application?
|
|
|
|
|
Just make your "looper" another "client" application that sends asynchronous requests to whatever server for status and retry requests. Use a timer, service, sleep loop, thread with UI, whatever. Looper can run from anywhere, including the server.
|
|
|
|
|
So what your saying is don't use a web service for this but create another web application for the looping code. Is this correct? If this is the case
how would I get the original main web service that handles the main client I/O to communicate with the new web application? I know I would have no problem sending service requests to the main web service but don't know how requests would go the other way. I guess I could always use the database to go from the main web service to the web application. Does this sound like the best way to go?
|
|
|
|
|
I suggested a "client" (NOT web) application: console; Windows forms; WPF; service; Java whatever. Something more manageable and flexible than a "web app".
If you want to know more about how "servers talk to clients", refer to "asynchronous callbacks".
You've already established a work-flow; all you're trying to do is introduce a retry mechanism. Step back and think about this "client" as a "monitor" / observer that submits retry requests; that's all.
|
|
|
|
|
I think I understand. The application does have a main entry point and there I can start a separate thread to handle the observation of the primary web services output.
|
|
|
|
|
Yes; start small. Just query the server every 30 seconds at first (send a web request; the server responds) as a proof-of-concept. Once that mechanism is working, introduce a new request to "retry", etc.
|
|
|
|
|
Thanks! Once I get something working I will post the code back to see if everyone agrees with my design.
|
|
|
|
|
We have a php project (made in core php and mysql), now i am willing to scale it and would like to go for SOA. I am thinking of a service layer with WCF and calling those services from my PHP code. What would be the best way to move further? Is it the right way i am thinking or any other way should i consider?
Thanks,
PS:We are developing a product and started with core PHP due to resource shortage, Please suggest me a way so that we can design APIs and reusable components consumable by any client.
|
|
|
|
|
Not exactly sure what you think you are asking but if you are attempting to design a system to meet business needs...
First it doesn't have anything to do with specific technologies.
Second the FIRST thing that is needed is realistic business expectations as to what the business actually needs.
Finally, most business realistic needs do not require anything at all in terms of scaling with modern environments.
|
|
|
|
|
I'm developing a C# desktop app which runs on Windows, Mac and Linux (under .NET or Mono).
The plan is for the program to be divided into two parts in separate processes: The front end GUI and the back end storage server.
The reason for dividing roles in this manner is to facilitate access to the data store by indexing services. The data store can be indexed by the operating system regardless of whether or not the front end GUI is running.
So, my question is: What technique do you think I should use for inter-process communications between the front end and the back end? HTTP-based REST is feasible but how fast is it in practice? I need something fast and cross-platform compatible. Any suggestions?
|
|
|
|
|
markrlondon wrote: The front end GUI ...I need something fast
Exactly how fast are the humans that use that?
For a desktop app that has, for example, 100,000 simultaneous users to the same back end, I suspect you are going to run into other problems.
markrlondon wrote: HTTP-based REST is feasible but how fast is it in practice
Versus what? Everything is basically IP these days. And unless there is something really wrong with your network even establishing a connection takes too little time for a human to care.
So unless you have some actual real (and realistic) business metrics that are very large then use whatever you already know. Because doing that will mean less delivery time of the product and that is much more likely to be what the business cares about.
|
|
|
|
|
Thanks for the reply.
Just catching up here...
|
|
|
|
|
.NET and Mono are not the same beast; you'll find that there are subtle differences in implementation.
Fast inter-proces communication can be achieved by writing to shared memory.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Hello everyone. I want to create web service for mobile game. Can anyone say about his experience and may recommend some principals, arhitecture., service.
Thank you
|
|
|
|
|
I am the senior engineer at my firm and I have been asked to outsource some of our projects. After much deliberation, we had two projects done this way.
Here is the question... my team and I reviewed the solutions and found a pattern that we could not understand... here is one example:
The ASP.NET application contained a few work steps where an email was to be sent. There were a total of 13 different instances. Each instance had code to read the app.config settings, set the mail properties and send the email. A new SMTP server required SSL and we had to update all 13 instances.
SO... why would the developers code this 13 times, instead of writing a simple static method/function???
We took the solution apart and found this "pattern" all over the place.. lots of cut/paste, hard coded values, etc... I am missing something? Is this something we have to get used to when dealing with outsourcing?
I know.. lots of questions.. but some insight would be appreciated... thanks.
LM
|
|
|
|
|
Lucas A. Martinez wrote: Is this something we have to get used to when dealing with outsourcing Yes!
Think about their business model, they make money from churning out solutions and the hours spent supporting the solutions. So the faster the solution and the more intensive the support the more money they make!
Where is the incentive to write elegant, supportable code? It always astonishes me when an organisation outsources their development and then expects quality.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Next time, give them a small job for a fixed bid that you can review at the end of the week.
If they "fail", they don't get paid or hired. Get it in writing.
(In the freelance "business", "fixed bids" typically don't get paid if you botch the job).
Another thing: the person you interview is not always the one that winds up doing the job ... You can be as skilled as you want interviewing, but in the end, they may very well just pass your project on to some code factory (because you can't see them).
And all the while you're thinking: "But they sounded like they knew what they were doing...".
And of course they did.
Anyway, outsourced or not, there should be some deliverable to review at the end of each week so you can catch issues like the one above.
I assume the project manager / lead was "theirs"?
No?
|
|
|
|
|
It probably would be best to review the code yourself and make no compromises.
Unfortunately, I am one of "them" and have seen stuff that would probably make any sane programmer want to shoot him(her)self, but I have also seen that the above method works. I would recommend trying that, if possible.
|
|
|
|