Search Results

Search found 1802 results on 73 pages for 'a bright worker'.

Page 3/73 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Running Jetty under Windows Azure Using RoleEntryPoint in a Worker Role

    - by Shawn Cicoria
    This post is built upon the work of Mario Kosmiskas and David C. Chou’s prior postings – from here: http://blogs.msdn.com/b/mariok/archive/2011/01/05/deploying-java-applications-in-azure.aspx  http://blogs.msdn.com/b/dachou/archive/2010/03/21/run-java-with-jetty-in-windows-azure.aspx As Mario points out in his post, when you need to have more control over the process that starts, it generally is better left to a RoleEntryPoint capability that as of now, requires the use of a CLR based assembly that is deployed as part of the package to Azure. There were things I liked especially about Mario’s post – specifically, the ability to pull down the JRE and Jetty runtimes at role startup and instantiate the process using the extracted bits.  The way Mario initialized the java process (and Jetty) was to take advantage of a role startup task configured as part of the service definition.  This is a great quick way to kick off processes or tasks prior to your role entry point.  However, if you need access to service configuration values or role events, that’s where RoleEntryPoint comes in.  For this PoC sample I moved the logic for retrieving the bits for the jre and jetty to the worker roles OnStart – in addition to moving the process kickoff to the OnStart method.  The Run method at this point is there to loop and just report the status of the java process. Beyond just making things more parameterized, both Mario’s and David’s articles still form the essence of the approach. The solution that accompanies this post provides all the necessary .NET based Visual Studio project.  In addition, you’ll need: 1. Jetty 7 runtime http://www.eclipse.org/jetty/downloads.php 2. JRE http://www.oracle.com/technetwork/java/javase/downloads/index.html Once you have these the first step is to create archives (zips) of the distributions.  For this PoC, the structure of the archive requires that the root of the archive looks as follows: JRE6.zip jetty---.zip Upload the contents to a storage container (block blob), and for this example I used /archives as the location.  The service configuration has several settings that allow, which is the advantage of using RoleEntryPoint, the ability to provide these things via native configuration support from Azure in a worker role. Storage Explorer You can use development storage for testing this out – the zipped version of the solution is configured for development storage.  When you’re ready to deploy, you update the two settings – 1 for diagnostics and the other for the storage container where the /archives are going to be stored. <?xml version="1.0" encoding="utf-8"?> <ServiceConfiguration serviceName="HostedJetty" osFamily="2" osVersion="*"> <Role name="JettyWorker"> <Instances count="1" /> <ConfigurationSettings> <!--<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=<accountName>;AccountKey=<accountKey>" />--> <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" /> <Setting name="JettyArchive" value="jetty-distribution-7.3.0.v20110203b.zip" /> <Setting name="StartRole" value="true" /> <Setting name="BlobContainer" value="archives" /> <Setting name="JreArchive" value="jre6.zip" /> <!--<Setting name="StorageCredentials" value="DefaultEndpointsProtocol=https;AccountName=<accountName>;AccountKey=<accountKey>"/>--> <Setting name="StorageCredentials" value="UseDevelopmentStorage=true" />   For interacting with Storage you can use several tools – one tool that I like is from the Windows Azure CAT team located here: http://appfabriccat.com/2011/02/exploring-windows-azure-storage-apis-by-building-a-storage-explorer-application/  and shown in the prior picture At runtime, during role initialization and startup, Azure will call into your RoleEntryPoint.  At that time the code will do a dynamic pull of the 2 archives and extract – using the Sharp Zip Lib <link> as Mario had demonstrated in his sample.  The only different here is the use of CLR code vs. PowerShell (which is really CLR, but that’s another discussion). At this point, once the 2 zips are extracted, the Role’s file system looks as follows: Worker Role approot From there, the OnStart method (which also does the download and unzip using a simple StorageHelper class) kicks off the Java path and now you have Java! Task Manager Jetty Sample Page A couple of things I’m working on to enhance this is to extract the jre and jetty bits not to the appRoot but to a resource location defined as part of the service definition. ServiceDefinition.csdef <?xml version="1.0" encoding="utf-8"?> <ServiceDefinition name="HostedJetty" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition"> <WorkerRole name="JettyWorker"> <Imports> <Import moduleName="Diagnostics" /> <Import moduleName="RemoteAccess" /> <Import moduleName="RemoteForwarder" /> </Imports> <Endpoints> <InputEndpoint name="JettyPort" protocol="tcp" port="80" localPort="8080" /> </Endpoints> <LocalResources> <LocalStorage name="Archives" cleanOnRoleRecycle="false" sizeInMB="100" /> </LocalResources>   As the concept matures a bit, being able to update dynamically the content or jar files as part of a running java solution is something that is possible through continued enhancement of this simple model. The Visual Studio 2010 Solution is located here: HostingJavaSln_NDA.zip

    Read the article

  • Threadpool with pasistant worker instances

    - by Matt Smokey-waters Holmes
    So basically what im trying to do is queue up tasks in a thread pool to be executed as soon as a worker becomes free, i have found various examples of this but in all cases the examples have been setup to use a new Worker instance for each job, i want persistent workers. Im trying to make a ftp backup tool, i have it working but because of the limitations of a single connection it is slow. What i ideally want to do is have a single connection for scanning directories and building up a file list then four workers to download said files. Here is an example of my worker /** * FTP Worker */ public class Worker implements Runnable { protected FTPClient _ftp; // Connection details protected String _host = ""; protected String _user = ""; protected String _pass = ""; // worker status protected boolean _working = false; public Worker(String host, String user, String pass) { this._host = host; this._user = user; this._pass = pass; } // Check if the worker is in use public boolean inUse() { return this._working; } @Override public void run() { this._ftp = new FTPClient(); this._connect(); } // Download a file from the ftp server public boolean download(String base, String path, String file) { this._working = true; boolean outcome = true; //create directory if not exists File pathDir = new File(base + path); if (!pathDir.exists()) { pathDir.mkdirs(); } //download file try { OutputStream output = new FileOutputStream(base + path + file); this._ftp.retrieveFile(file, output); output.close(); } catch (Exception e) { outcome = false; } finally { this._working = false; return outcome; } } // Connect to the server protected boolean _connect() { try { this._ftp.connect(this._host); this._ftp.login(this._user, this._pass); } catch (Exception e) { return false; } return this._ftp.isConnected(); } // Disconnect from the server protected void _disconnect() { try { this._ftp.disconnect(); } catch (Exception e) { /* do nothing */ } } } and basically i want to be able to call Worker.download(...) for each task in a queue whenever a worker becomes available without having to create a new connection to the ftp server for each download Any help would be appreciated as iv'e never used threads before and I'm going round in circles at the moment

    Read the article

  • Logging in worker threads spawned from a pylons application does not seem to work

    - by TimM
    I have a pylons application where, under certain cirumstances I want to spawn multiple worker threads to process items in a queue. Right now we aren't making use of a ThreadPool (would be ideal, but we'll add that in later). The main problem is that the worker threads logging does not get written to the log files. When I run the code outside of the pylons application the logging works fine. So I think its something to do with the pylons log handler but not sure what. Here is a basic example of the code (trimmed down): import logging log = logging.getLogger(__name__) import sys from Queue import Queue from threading import Thread, activeCount def run(input, worker, args = None, simulteneousWorkerLimit = None): queue = Queue() threads = [] if args is not None: if len(args) > 0: args = list(args) args = [worker, queue] + args args = tuple(args) else: args = (worker, queue) # start threads for i in range(4): t = Thread(target = __thread, args = args) t.daemon = True t.start() threads.append(t) # add ThreadTermSignal inputData = list(input) inputData.extend([ThreadTermSignal] * 4) # put in the queue for data in inputData: queue.put(data) # block until all contents are downloaded queue.join() log.critical("** A log line that appears fine **") del queue for thread in threads: del thread del threads class ThreadTermSignal(object): pass def __thread(worker, queue, *args): try: while True: data = queue.get() if data is ThreadTermSignal: sys.exit() try: log.critical("** I don't appear when run under pylons **") finally: queue.task_done() except SystemExit: queue.task_done() pass Take note, that the log lin within the RUN method will show up in the log files, but the log line within the worker method (which is run in a spawned thread), does not appear. Any help would be appreciated. Thanks ** EDIT: I should mention that I tried passing in the "log" variable to the worker thread as well as redefining a new "log" variable within the thread and neither worked. ** EDIT: Adding the configuration used for the pylons application (which comes out of the INI file). So the snippet below is from the INI file. [loggers] keys = root [handlers] keys = wsgierrors [formatters] keys = generic [logger_root] level = WARNING handlers = wsgierrors [handler_console] class = StreamHandler args = (sys.stderr,) level = WARNING formatter = generic [handler_wsgierrors] class = pylons.log.WSGIErrorsHandler args = () level = WARNING format = generic

    Read the article

  • Which to install: Apache Worker or Prefork? What are the (dis-)advantages of each?

    - by Aron Rotteveel
    Based on the descriptions for both the Prefork and Worker MPM, it seems the prefork type is somewhat outdated, but I can't really find a proper comparison of the two types. What i'd like to know: What are the differences between the two versions? What are the (dis-)advantages of each server type? Are there any basic guidelines on which type to choose based on the conditions? Are there any big performance differences between the two?

    Read the article

  • SharePoint 2010 Information Worker VM available for download

    - by Enrique Lima
    If you interested in a test drive of the technologies around the Wave 14 launch, take look at the VM made available from Microsoft. It is a very well rounded option to explore the new products. 2010 Information Worker Demonstration and Evaluation Virtual Machine Note:  It is important to understand you will need a system with Hyper-V to import this VM and get it off and working.  Also, make sure you keep a copy of the original unpacked VM as this is based on a trial version of the OS (time bombed) and there is a chance to rearm the VM, but you are better off either keeping the original files or taking a snapshot as soon as the VM is living in your Hyper-V environment.

    Read the article

  • Second Monitor Gets Bright, and then Blank.

    - by Jonathan Sampson
    I recently added a second LCD monitor to my home-computer. It was working fine for the first couple of days, but then it started having problems. Every 10-20 minutes it would get really bright, and then instantly go black. The power was still connected, so it wasn't turned off. If I turned the power off for a few minutes, I could turn it back on and get another 10-20 minutes of work done before it would happen again. What could cause this behavior?

    Read the article

  • Dell 620 display is too bright to use

    - by keith
    I have a Dell D620 with a display problem. In windows 7 the display seems to be too bright, the text is broken up, the only way to see the mouse is at a very oblique angle. Changing the brightness with fn and brightness control has little/no effect. When I put it in high contrast mode I can see all the colors, but any windows pictures etc are still useless. I cannot get it to connect to an external monitor via VGA port or via a USB-VGA connector.

    Read the article

  • Brightness too dark or too bright

    - by YatharthROCK
    Basically, below a seemingly-arbitrary threshold (seems to be around 60%) my laptop screen is too dark to really make out much, and above that threshold it takes its maximum brightness (which is waay too bright for my eyes). This problem only occurs when I change the brightness using Windows' UI. Changing the brightness using Fn keys on my keyboard works as expected; unless the screen went into dark mode because of Windows, in which case they have no effect. This problem started occuring on my ASUS laptop very recently. My laptop has a poor battery, but I don't think that's related. What is going on? I tried resetting power plan settings, turning off adaptive brightness and restarting. I'll give any info asked for. Help required urgently...

    Read the article

  • How should I host our scalable worker processes?

    - by Pieter Breed
    We are designing a new architecture for an enterprise business. The principles we've followed so far is not to develop what you can (possible buy and) deploy, ie, don't reinvent any wheels. In this way we've decided on CQRS, RabbitMQ, Riak and a bunch of other things. We still need to write /some/ business code though and these will be in the form of worker processes, which will consume commands from a message queue and after any side-effects, produce events onto another message queue. The idea behind this is that via the competing-consumers design we will have a scalable design right out of the box. One option is of writing a management infrastructure that will know how to: deploy code instantiate processes kill processes update configuration etc IE provide fault tolerance and scalability. Also, this is exactly what something like GAE and Heroku does for you, but in a public setting and in our organization, public is bad. My question is, is there an out-of-the-box solution that we can use to host our consumers in? Like a private cloud or private platform-as-a-service. Private Heroku or GAE. Is there some kind of software or software product with which we can do all of these things and thereby get scalability and fault tolerance over our consumers?

    Read the article

  • Co-worker renamed all of my queries

    - by anon
    I don't know if I should be very irritated or what. I single handedly built over 300 queries for a large database, and developed a naming convention so I could find them later. No one else in my office even knows how to build a query, but I came in yesterday to find that all of them had been renamed. I am now having a very hard time finding things, and I am trying to figure out what to do. I spoke with the person responsible, and she just downplayed the whole thing. She said she renamed them so she can find them more easily. Unfortunately, I am the only one who knows how to build, edit, and maintain them, and the only reason she needed to find them was to test the queries. The new naming convention doesn't make sense at all, and I feel like we have taken a backwards step in the development process. What I'm trying to figure out is: 1) Am I overreacting? 2) What is the best way to handle this? I hate to mention this to my boss, but after speaking with my co-worker yesterday, I can already tell she feels like she did nothing wrong.

    Read the article

  • IIS, multiple CPU cores, application pools and worker processes - best configuration for a single si

    - by Egghead Design
    Hi We use Kentico CMS and I've exchanged emails with them about a web garden deployment. We have a single site running on a server with 8 cpu cores. In line with Kentico's advice, we have not altered the application pool web garden setting from the default i.e. it is set to a maximum number of worker processes of 1. Our experience is that the site only uses one of the cpu cores - the others are idling. When I emailed them about this, their response was that the OS/IIS would handle this and use other cores as necessary even though the application pool only has a single worker process. Now, I've a lot of respect for the guys at Kentico, but this doesn't seem right to me? Surely, if we want to use all cores, we need to permit eight worker processes (and implement session state storage in SQL server)? Many thanks Tony

    Read the article

  • IIS7 application pool spawning worker processes

    - by scott_lotus
    IIS7 ASP.net 2.0 Number of worker processes growing out of control in single app pool. Appear to keep spawning upwards. Monitoring the w3wp.exe process i can see "current connections" to web service sometimes spawn out of control but not always , only worker processes are consistently growing when this issue occurs. Number of worker processes normally 0 - 20 , when spawning they can reach 1000 + This was deployed in: %windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet.config maxConcurrentRequestsPerCPU="50000" maxConcurrentThreadsPerCPU="0" requestQueueLimit="50000" But issue still occurs. Have tried running PROCDUMP on the exe process but the mini dump isnt a great help. I understand this is 99% probable an app issue , what i need help with is tracking it down. Thank you for any tips. Scott

    Read the article

  • What happens to other users if the .NET worker process crashes?

    - by Jason Slocomb
    My knowledge of how processes are handled by the ASP.Net worker process is woefully inadequate. I'm hoping some of the experts out there can fill me in. If I crash the worker process with a System.OutOfMemoryException, what would the user experience be for other users who were being served by the same process? Would they get a blank screen? 503 error? I'm going to attempt to test this scenario with some other folks in our lab, but I thought I would float this out there. I will update with our results.

    Read the article

  • How do I configure the number of worker threads used by SqlServer 2005 Agent

    - by Decker
    How can I increase the limit of worker threads from the default 10 for SQL Server 2005 SqlAgent? I have 9 jobs that run almost continuously and that leaves only one available thread for the rest of the scheduled jobs. Oftentimes, when no thread is available, I will see the jobs in "Waiting for worker thread" state. I'd like to increase the number to about 12 (which should do the trick for me). Any idea where this is set?

    Read the article

  • Apache keeps crashing due to unable to create worker thread

    - by Dina Abu-khader
    Hello , Am getting a lot of these in our error log ((11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread) and (110)Connection timed out: proxy: HTTP: attempt to connect to 127.0.0.1:80 (*) failed The parameters of the worker in httpd.conf are as follows StartServers 8 ServerLimit 128 MaxClients 2048 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 32 MaxRequestsPerChild 10000 I have changed the stack size in limit.conf but still not helping , Can anyone please help me ?

    Read the article

  • Worker roles in Windows Azure to host a multiplayer server

    - by MrWiggels
    I've been doing research on where to host a simple multi-player backend for a simple game I'm developing. So as a first choice I downloaded the Windows Azure SDK, which provides a nice and simple emulator environment where you can test out your application before uploading. I also download the Azure Social Game Toolkit (Visit), and followed as far as my understanding can take me. So, down to the main question. Is there anybody with experience developing Azure applications. I'm developing a Action RPG game, in a similar vein to Diablo III. I was thinking of putting up Matchmaking, Friends Lists, etc. Is there another way to connect to Azure services via something like UDP or TCP for sending packets or does everything have to go through HTTP requests? Is it even possible to use HTTP request/response for something like this? All game commands will be simple. Because the game server and the clients will be kept in-sync and will have deterministic actions, I'm just going to send actions like "Use Primary Skill" and "Use Secondary Skill". Any hints, ideas, light bulbs or a smack-in-the-face presentation will be much appreciated.

    Read the article

  • its about bright controll

    - by nag
    hi im using vaio- vgn-cr35g....function keys are not working and brightness controll has become a problem , even i m not getting it in more power options,earlier it was there ...can any one help me to overcome the same..........thanku

    Read the article

  • Are my actual worker threads exceeding the sp_configure 'max worker threads' value?

    Tom Stringer (@SQLife) was working on some HADR testing for a customer to simulate many availability groups and introduce significant load into the system to measure overhead and such. In his quest to do that he was seeing behavior that he couldn’t really explain and so worked with him to uncover what was happening under the covers. Understand Locking, Blocking & Row VersioningRead Kalen Delaney's eBook to understand SQL Server concurrency, and use SQL Monitor to pinpoint excessive blocking and deadlocking. Download free resources.

    Read the article

  • Dealing with under performing co-worker

    - by PSU_Kardi
    I'm going to try to keep this topic as generic as I can so the question isn't closed as too specific or whatever. Anyway, let's get to it. I currently work on a somewhat small project with 15-20 developers. We recently hired a few new people because we had the hours and it synched up well with the schedule. It was refreshing to see hiring done this way and not just throwing hours & employees at a problem. Alas, I could argue the hiring process still isn't perfect but that's another story for another day. Anyway, one of these developers is really under performing. The developer is green and has a lot of bad habits. Comes in later than I do and leaving earlier than I am. This in and of itself isn't an issue, but the lack of quality work makes it become a bit frustrating. When giving out tasking the question is no longer, what can realistically be given but now becomes - How much of the work will we have to redo? So as the project goes on, I'm afraid this might cause issues with the schedule. The schedule could have been defined as a bit aggressive; however, given that this person is under performing it now in my mind goes from aggressive to potentially chaotic. Yes, one person shouldn't make or break a schedule and that in and of itself is an issue too but please let's ignore that for right now. What's the best way to deal with this? I'm not the boss, I'm not the project lead but I've been around for a while now and am not sure how to proceed. Complaining to management comes across as childish and doing nothing seems wrong. I'll ask the community for insight/advice/suggestions.

    Read the article

  • How to update GUI thread/class from worker thread/class?

    - by user315182
    First question here so hello everyone. The requirement I'm working on is a small test application that communicates with an external device over a serial port. The communication can take a long time, and the device can return all sorts of errors. The device is nicely abstracted in its own class that the GUI thread starts to run in its own thread and has the usual open/close/read data/write data basic functions. The GUI is also pretty simple - choose COM port, open, close, show data read or errors from device, allow modification and write back etc. The question is simply how to update the GUI from the device class? There are several distinct types of data the device deals with so I need a relatively generic bridge between the GUI form/thread class and the working device class/thread. In the GUI to device direction everything works fine with [Begin]Invoke calls for open/close/read/write etc. on various GUI generated events. I've read the thread here (How to update GUI from another thread in C#?) where the assumption is made that the GUI and worker thread are in the same class. Google searches throw up how to create a delegate or how to create the classic background worker but that's not at all what I need, although they may be part of the solution. So, is there a simple but generic structure that can be used? My level of C# is moderate and I've been programming all my working life, given a clue I'll figure it out (and post back)... Thanks in advance for any help.

    Read the article

  • WCF Service worker thread communicate with ServiceHost thread

    - by Brent
    I have a windows NT Service that opens a ServiceHost object. The service host context is per-session so for each client a new worker thread is created. What I am trying to do is have each worker thread make calls to the thread that started the service host. The NT Service needs to open a VPN connection and poll information from a device on the remote network. The information is stored in a SQL database for the worker threads to read. I only want to poll the device if there is a client connected, which will reduce network trafic. I would like the worker threads to tell the service host thread that they are requesting information and start the polling and updating the database. Everything is working if the device is alway being polled and the database being updated.

    Read the article

  • Simple description of worker and I/O threads in .NET

    - by Konstantin
    It's very hard to find detailed but simple description of worker and I/O threads in .NET What's clear to me regarding this topic (but may not be technically precise): Worker threads are threads that should employ CPU for their work; I/O threads (also called "completion port threads") should employ device drivers for their work and essentially "do nothing", only monitor the completion of non-CPU operations. What is not clear: Although method ThreadPool.GetAvailableThreads returns number of available threads of both types, it seems there is no public API to schedule work for I/O thread. You can only manually create worker thread in .NET? It seems that single I/O thread can monitor multiple I/O operations. Is it true? If so, why ThreadPool has so many available I/O threads by default? In some texts I read that callback, triggered after I/O operation completion is performed by I/O thread. Is it true? Isn’t this a job for worker thread, considering that this callback is CPU operation? To be more specific – do ASP.NET asynchronous pages user I/O threads? What exactly is performance benefit in switching I/O work to separate thread instead of increasing maximum number of worker threads? Is it because single I/O thread does monitor multiple operations? Or Windows does more efficient context switching when using I/O threads?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >